@import './vars.less';

// 重写button样式
.ant_btn_reset() {
  /deep/ .ant-btn:hover {
    color: @text-color  !important;
  }

  /deep/ .ant-btn:focus {
    color: @text-color  !important;
  }
}

// 重写input样式
.ant_input_reset() {
  /deep/ .ant-input {
    background-color: transparent;
  }

  /deep/ .ant-input-disabled {
    color: @dark-color-6;
  }
}

// 重写input-number样式
.ant_inputnumber_reset() {
  /deep/ .ant-input-number {
    background-color: transparent;
  }

  /deep/ .ant-input-number-disabled {
    color: @dark-color-6;
  }

  /deep/ .ant-input-number-handler-wrap {
    display: none;
  }
}

// 重写select样式
.ant_select_reset() {
  /deep/ .ant-select-selection {
    background-color: transparent;
  }

  /deep/ .ant-select-arrow {
    color: white;
  }
}

// 重写slider样式
.ant_slider_reset() {
  /deep/ .ant-slider-rail {
    background-color: white;
  }

  /deep/ .ant-slider-track {
    background-color: @primary-color;
  }

  /deep/ .ant-slider-handle {
    background-color: @primary-color;
    border-color: @primary-color;
  }
}

// 重写popconfirm样式
.ant_popconfirm_reset() {
  .ant-popover {
    .ant-popover-arrow {
      border-color: @primary-color  !important;
    }

    .ant-popover-inner {
      background-color: @primary-color;

      .ant-popover-buttons .ant-btn {
        color: lighten(@dark-color, 99.9% - lightness(@dark-color));
        background: transparent;
        border: none;
        font-size: 12px;

        &.ant-btn-primary {
          border: 1px solid lighten(@dark-color, 99.9% - lightness(@dark-color));
        }
      }
    }

    &.popconfirm-delete {
      .ant-popover-buttons {
        display: none;
      }

      .ant-popover-message {
        padding: 4px 0 0 0;
      }
    }
  }
}

// 重写pagination样式
.ant_pagination_reset() {
  /deep/ .ant-pagination {
    .ant-pagination-item-active a {
      background: @primary-color;
      color: lighten(@dark-color, 99.9% - lightness(@dark-color));
    }

    .ant-pagination-item-ellipsis {
      color: lighten(@dark-color, 99.9% - lightness(@dark-color));
    }
  }
}

// 重写checkbox样式
.ant_checkbox_reset() {
  /deep/ .ant-checkbox-inner {
    background-color: transparent;
  }
}

// 重写collapse样式
.ant_collapse_reset() {
  /deep/ .ant-collapse {
    .ant-collapse-item {
      .ant-modal-close {
        .ant-modal-close-icon {
          color: white;
        }
      }

      .ant-collapse-content {
        background-color: @dark-color-5;
      }

    }

  }
}

// 重写table样式
.ant_table_reset() {
  /deep/ .ant-table {
    background-color: transparent;
    border: 1px solid @dark-color-5;
    border-radius: 0.25rem;
    .ant-table-row-selected {
      td {
        background-color: transparent;
      }
    }

    .ant-table-placeholder {
      background-color: transparent;

      .ant-empty-description {
        color: white;
      }
    }

    .ant-table-thead {
      th {
        background-color: @dark-color-4;
      }
    }

    .ant-table-selection-column {
      .ant-checkbox-inner {
        border-color: @dark-color-6;
        background-color: transparent;
      }
    }

    .ant-table-tbody .ant-table-row:nth-child(odd) {
      background-color: transparent;
    }
   
    .ant-table-tbody .ant-table-row:nth-child(even) {
      background: @dark-color-4;
    }
  }
}

// 重写modal样式
.ant_modal_reset() {
  /deep/ .ant-modal-content {
    background-color: @dark-color-3;

    .ant-modal-header {
      background-color: inherit;
    }
  }

}